import { createRouter, createWebHashHistory } from 'vue-router';
import routes from './router';
import baseRouter from './baseRouter';
// const routes:any = []
// Vue-router新版本中，需要使用createRouter来创建路由
const router = createRouter({
    // 指定路由的模式,此处使用的是hash模式
    history: createWebHashHistory(),
    routes: [...routes, ...baseRouter]
});

router.beforeEach((to, from, next) => {
    const name = to.name;
    next();
});

export default router;
